J.R.R. Tolkien. He had Elves as the great old landed/forested aristocracy who die out by marrying into the common Man, Dwarves as having died out and just not noticed yet because they were so isolated, and Halflings as blissfully ignorant country folk full of fine qualities that educated town sorts lack.So, since Gygax (if not before), orcs are basically often treated as "fantasy black people," or rather, orcs are basically "stereotypes about blacks made into a species."
Orcs were what an arch-Angel did by fucking with Elves. Literally mixing their fine blood with mud to make ... well, mudbloods, not particularly subtle. Tolkien also has actual Black people, with elephants and whatnot, who are of course on Sauron's side. And mountain-peoples, and sea-peoples, and nomadic horse-peoples, and so on.
It's sort of a British Ur-myth story of Hannibal against the Romans and the old Anglo-Saxon tribes and the horrible threat of miscegenation and how awesome everything was in the past before people had to marry for money and how the Welsh aren't even a thing any more, are they?
Then D&D had Orcs for the same reason it had the Balrog and mighty Wizards and whatnot, because Tolkien fantasy was retro-popular in 1974 thanks to the rush of cheap fantasy pulp and they just stuck it all in there.
